<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- creator-baremetal-dev.qdoc -->
  <title>Connecting Bare Metal Devices | Qt Creator Manual</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qt Creator Manual</a></td><td >Connecting Bare Metal Devices</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="index.html">Qt Creator Manual 4.11.1</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="creator-developing-android.html" />
  <link rel="next" href="creator-developing-generic-linux.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="creator-developing-android.html">Connecting Android Devices</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-developing-generic-linux.html">Connecting Embedded Linux Devices</a>
</p><p/>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Connecting Bare Metal Devices</h1>
<span class="subtitle"></span>
<!-- $$$creator-developing-baremetal.html-description -->
<div class="descr"> <a name="details"></a>
<p>You can connect bare metal devices to a development host to run and debug applications on them from Qt Creator using GDB or a hardware debugger. This enables you to debug on small devices that are not supported by the generic remote Linux device plugin. However, if the device does not have Qt libraries, you need a fake Qt installation.</p>
<p>The bare metal device type accepts custom GDB commands that you specify in the device options. You can specify the commands to execute by default or the commands to execute when connecting to OpenOCD or ST-LINK Utility.</p>
<p>To connect bare metal devices:</p>
<ol class="1" type="1"><li>Select <b>Help</b> &gt; <b>About Plugins</b> &gt; <b>Device Support</b> &gt; <b>Bare Metal</b> to enable the Bare Metal Device plugin.</li>
<li>Restart Qt Creator to be able to use the plugin.</li>
<li>Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Devices</b> &gt; <b>Bare Metal</b> &gt; <b>Add</b> &gt; <b>Default</b>, <b>OpenOCD</b>, or <b>ST-LINK Utility</b> to specify connections to GDB servers or hardware debuggers:<p class="centerAlign"><img src="images/creator-baremetal-device.png" alt="&quot;Bare Metal options&quot;" /></p><ol class="1" type="1"><li>In the <b>Startup mode</b> field, select the mode to start the GDB server or debugger in. The available modes depend on the server or debugger.</li>
<li>In the <b>Host</b> field, select the host name and port number to connect to the GDB server or hardware debugger.</li>
<li>In the <b>Init commands</b> field, enter the commands to execute when initializing the connection.</li>
<li>In the <b>Reset commands</b> field, enter the commands to execute when resetting the connection.</li>
<li>Select <b>Apply</b> to add the GDB server or debugger.</li>
</ol>
</li>
<li>Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Devices</b> &gt; <b>Add</b> &gt; <b>Bare Metal Device</b> &gt; <b>Start Wizard</b>:<ol class="1" type="1"><li>In the <b>GDB server provider</b> field, select a GDB server or hardware debugger.</li>
<li>Select <b>Apply</b> to add the device.</li>
</ol>
</li>
<li>Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Kits</b> &gt; <b>Add</b> to add a kit for building applications and running them on bare metal devices:<p class="centerAlign"><img src="images/creator-baremetal-kits.png" alt="&quot;Bare Metal Device kits&quot;" /></p><ol class="1" type="1"><li>In the <b>Name</b> field, specify a name for the kit.</li>
<li>In the <b>Device type</b> field, select <b>Bare Metal Device</b>.</li>
<li>In the <b>Device</b> field, select the bare metal device for the kit.</li>
<li>Select <b>Apply</b> to add the kit.</li>
</ol>
</li>
<li>Open a project for an application you want to develop for the device.</li>
<li>Select <b>Projects</b> &gt; <b>Build &amp; Run</b>, and then select the kit for building the application and running it on the bare metal device specified in the kit.<p class="centerAlign"><img src="images/creator-baremetal-kit-for-project.png" alt="&quot;Adding a bare metal kit for a project&quot;" /></p></li>
<li>Select <b>Run</b> to specify run settings.<p>Usually, you can use the default settings.</p>
</li>
</ol>
</div>
<!-- @@@creator-developing-baremetal.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="creator-developing-android.html">Connecting Android Devices</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-developing-generic-linux.html">Connecting Embedded Linux Devices</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
